/**
 * XL-Payment 默认配置
 */

// 支付宝支付配置
const alipayConfig = {
  appId: '',
  privateKey: '',
  publicKey: '',
  gateway: 'https://openapi.alipay.com/gateway.do', // 正式环境
  notifyUrl: '',
  mode: 'development' // development, production
};

// 微信支付配置
const wechatConfig = {
  appId: '',
  mchId: '',
  apiKey: '',
  notifyUrl: '',
  mode: 'development' // development, production
};

// 虚拟支付配置
const virtualConfig = {
  enabled: true,
  exchangeRate: 100, // 兑换比例：100积分=1元
  mode: 'development' // development, production
};

// 银联支付配置
const unionpayConfig = {
  merId: '',
  privateKey: '',
  notifyUrl: '',
  mode: 'development' // development, production
};

// 全局配置
const globalConfig = {
  // 可用的支付方式
  availablePaymentMethods: ['wechat', 'alipay', 'unionpay', 'virtual'],
  
  // 默认支付方式
  defaultPaymentMethod: 'wechat',
  
  // 支付环境
  env: 'development', // development, production
  
  // 是否自动轮询检查支付状态
  autoPolling: true,
  
  // 轮询间隔 (毫秒)
  pollingInterval: 3000,
  
  // 轮询超时时间 (毫秒)
  pollingTimeout: 60000,
  
  // API基础URL
  apiBaseUrl: '',
  
  // 是否启用日志
  enableLog: true,
  
  // 日志级别：debug, info, warn, error
  logLevel: 'info'
};

// 默认配置
export default {
  global: globalConfig,
  alipay: alipayConfig,
  wechat: wechatConfig,
  virtual: virtualConfig,
  unionpay: unionpayConfig
}; 